function [recon_cs_ref,recon_cs_zf] = GROG_reconstruction_CS_demo(y_ref,b1_ref,Weighting_ref,mask_ref,SG_ref,LP1,ref_ref)

    param.SG=single(SG_ref);
    param.y=single(y_ref);
    clear kdata3;
    param.E=Emat_GROG2DSG(single(mask_ref),single(b1_ref),single(Weighting_ref));
    recon_cs=single(param.E'*param.y);
    
    recon_cs = gpuArray(recon_cs);
    recon_cs_zf = (recon_cs);
    clear mask; clear b1; clear Weighting; clear SoftWeight;
    param.TV=TV_Temp();
    Weight1=LP1;
    nx = size(recon_cs,1)/2-size(recon_cs,1)/16:size(recon_cs,1)/2+size(recon_cs,1)/16-1;
    m1 = ref_ref(nx,nx,:);
    param.TVWeight=max(abs(m1(:)))*Weight1;
    param.nite = 11;param.display = 1;
    for n=1:2
        recon_cs = CSL1NlCg_4DDCE(recon_cs,param);
    end
    recon_cs_ref = recon_cs;
 